# # 使用 Nginx 最新版
# FROM nginx:latest
# # 复制配置文件
# COPY nginx.conf /etc/nginx/nginx.conf  

# # 复制发布后的文件到 Docker Nginx对应的文件中
# COPY ./dist /usr/share/nginx/html


# # 暴露80端口
# EXPOSE 80
# # 启动 nginx 服务器
# CMD ["nginx", "-g", "daemon off;"]

FROM nginx:latest

# 复制前端文件到Nginx默认目录
COPY ./dist /usr/share/nginx/html

# 复制自定义Nginx配置
COPY nginx.conf /etc/nginx/nginx.conf

# 暴露端口
EXPOSE 80

# 启动Nginx
CMD ["nginx", "-g", "daemon off;"]